// const a = async function (echarts, d, { xe: { get, pluck }, dc: { http } }) {
//   const { items: benji } = await http.post({
//     url: "/dc/data/load/1792909668627038209",
//     data: {},
//   });
//   const { items: shangji } = await http.post({
//     url: "/dc/data/load/1792909073803427842",
//     data: {},
//   });
//   return { benji, shangji };
// };

// {
//   "sql": {
//     "get": "SELECT COUNT(`公司名称`) \"num\", SUM(`2023年兑现资金`) \"money\" FROM STAT WHERE `2023年兑现资金` > 0"
//   }
// }

const a = function (_, { data }, { xe: { sum } }) {
  const { benji, shangji } = data;

  const benjiSum = sum(benji, "ys");
  const shangjiSum = sum(shangji, "ys");
  return {
    tooltip: {
      trigger: "item",
      formatter: function (params) {
        return (
          params.name +
          " : " +
          params.value.toLocaleString() +
          " (" +
          params.percent +
          "%)"
        );
      },
    },
    legend: {
      orient: "vertical",
      left: "left",
      data: ["本级", "上级"],
    },
    grid: {
      containLabel: true,
      top: 40,
      left: "10",
      right: "40",
      bottom: "10",
    },
    series: [
      {
        type: "pie",
        roseType: "radius",
        data: [
          {
            name: "本级",
            value: benjiSum,
          },
          {
            name: "上级",
            value: shangjiSum,
          },
        ],
      },
    ],
  };
};

const j = {
  self: {
    class: "h-full",
  },
  custom: {
    load: "return async function () { return [{name: '一体化', value: 70}, {name: '公共平台', value: 10},{name: '亲清在线', value: 25}]; }",
  },
  method: {
    update:
      "return function(echarts, { data }, { dc: { getPie3D }, xe: { pluck } }) { console.log('chart data: ', data, getPie3D); const series = getPie3D(data, 0, 0.3, 1); const option = { title: { show: false }, legend: { show: false }, animation: true, tooltip: { show: false }, xAxis3D: { }, yAxis3D: { }, zAxis3D: {  }, grid3D: { show: false, boxHeight: 30, left: 'center', viewControl: { distance: 150, alpha: 30, beta: 0, rotateSensitivity: 1, zoomSensitivity: 1, panSensitivity: 0, autoRotate: true } }, series: series }; return option; }",
  },
};


jldw,zcbdw,tisgj,fxzrr,rxgj,fileList,

#{params.ztz},#{params.htzzj},#{params.kgrq},#{params.jgrq},#{params.jrrq},#{params.gcsd},#{params.sgxkzbh},#{params.sgxkzrq},#{params.jsdw},#{params.kcdw},#{params.sjdw},#{params.stdw},#{params.jldw},#{params.zcbdw},#{params.tisgj},#{params.fxzrr},#{params.rxgj},#{params.fileList}